PROJ=dqDeformer
SOURCES = ./dqDeformer.cpp ./dualQuaternionCmd.cpp ./pluginMain.cpp ./MDualQuaternion.cpp
OBJECTS = $(notdir $(SOURCES:.cpp=.o))
MAYA_LOCATION = /usr/autodesk/maya2009-x64

INCLUDES = -I$(MAYA_LOCATION)/include -I./ -I/usr/X11R6/include
LIBS = -L$(MAYA_LOCATION)/lib -lOpenMaya -lFoundation -lGL -lOpenMayaAnim

#compiler options
CC = g++
CFLAGS		= -DBits64_ -m64 -DUNIX -D_BOOL -DLINUX -DFUNCPROTO -D_GNU_SOURCE -DLINUX_64 -fPIC \
		-fno-strict-aliasing -DREQUIRE_IOSTREAM -Wno-deprecated -O3 -Wall \
		-Wno-multichar -Wno-comment -Wno-sign-compare -funsigned-char \
		-Wno-reorder -fno-gnu-keywords -ftemplate-depth-25 -pthread
C++FLAGS	= $(CFLAGS) $(WARNFLAGS) -Wno-deprecated -fno-gnu-keywords
LDFLAGS = -shared $(C++FLAGS) -Wl,-Bsymbolic,--no-undefined


all: $(PROJ)

#rule to link
$(PROJ): $(OBJECTS)
	$(CC) $(LDFLAGS) $(LIBS) $(OBJECTS) -o $(PROJ).so

#compile
$(OBJECTS): $(SOURCES)
	$(CC) -c $(INCLUDES) $(C++FLAGS) $(SOURCES)


clean:
	rm -rf $(OBJECTS) $(PROJ).so $(MAYA_LOCATION)/bin/plug-ins/$(PROJ).so

install:
	cp $(PROJ).so $(MAYA_LOCATION)/bin/plug-ins/


